import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-basic-use-info',
  templateUrl: './basic-use-info.component.html',
  styleUrls: ['./basic-use-info.component.less']
})
export class BasicUseInfoComponent implements OnInit {

  code1 = `<ag-grid-angular
      style="width: 100%; height: 100%"
      class="ag-theme-alpine"
      [columnDefs]="colDef"
      [rowHeight]="30"
      [rowData]="orderList | async"
      [defaultColDef]="defaultColDef"
      [animateRows]="true"
      (gridReady)="onGridReady($event)"
      (cellClicked)="onCellClicked($event)"
    ></ag-grid-angular>`
  code2 = `const def = {
    field: config.colCode, // 取哪个属性值
    headerName: config.colName, // 表头名字
    width: TableConfig.getCellWidth(config), // 自定义单元格宽度
    valueGetter: SysClass.getSysClass(data.sysClass)?.name // 自定义单元格显示的内容
  } as ColDef`
  code3 = `defaultColDef: ColDef = {
    resizable: true
  }`
  constructor() { }

  ngOnInit(): void {
  }

}
